import { createApp } from 'vue'
import App from './App.vue'
import router from '../src/router'
import './store'

// 引入element组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入Vuetify
// import vuetify from '../src/plugins/vuetify'


// 引入markdown
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

import Prism from 'prismjs';


VueMarkdownEditor.use(vuepressTheme, {
  Prism,
  extend(md) {
    // md为 markdown-it 实例，可以在此处进行修改配置,并使用 plugin 进行语法扩展
    // md.set(option).use(plugin);
  },
});

let app = createApp(App)
// 全局注册Element Icon ，需要放在挂载之前
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.use(router)
// app.use(vuetify)
app.use(VueMarkdownEditor);
app.mount('#app')


